﻿<UserControl x:Class="Big3.Hitbase.Controls.ChoosePictureFastUserControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" x:Name="myUserControl"
             xmlns:local="clr-namespace:Big3.Hitbase.Controls"
             xmlns:sr="clr-namespace:Big3.Hitbase.SharedResources;assembly=Big3.Hitbase.SharedResources"
             d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.Resources>
        <Button x:Key="searchPictureButtonKey" Name="SearchPictureButton" Width="30" Height="30" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,5,5" Opacity="0" Click="SearchPictureButton_Click"  ToolTip="{sr:Loc ClickHereToSearchPicture}">
            <Image Source="pack://application:,,,/Big3.Hitbase.SharedResources;component/Images/SearchPicture.png" />
        </Button>
        <Button x:Key="showPictureButtonKey" Name="ShowPictureButton" Width="30" Height="30" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,5,5" Opacity="0" Click="ShowPictureButton_Click"  ToolTip="{sr:Loc ClickHereToShowPicture}" Visibility="Collapsed">
            <Image Source="pack://application:,,,/Big3.Hitbase.SharedResources;component/Images/ShowPicture.png" />
        </Button>

        <ContextMenu Opened="ContextMenu_Opened" x:Key="myContextMenu">
            <MenuItem Name="menuItemChooseImage" Click="menuItemChooseImage_Click" Header="Bild auswählen..."></MenuItem>
            <MenuItem Header="Bild scannen..."></MenuItem>
            <MenuItem Name="menuItemLoadFromWeb" Header="Bild aus dem Internet laden"></MenuItem>
            <MenuItem Name="menuItemSearchInWeb" Header="Bild im Internet suchen..." Click="menuItemSearchInWeb_Click"></MenuItem>
            <MenuItem Name="menuItemShowImage" Header="Bild anzeigen" Click="menuItemShowImage_Click"></MenuItem>
            <MenuItem Name="menuItemEditImage" Header="Bild bearbeiten" Click="menuItemEditImage_Click"></MenuItem>
            <MenuItem Name="menuItemDelete" Click="menuItemDelete_Click" Header="Bild entfernen"></MenuItem>
            <Separator></Separator>
            <MenuItem Name="menuItemCopy" Click="menuItemCopy_Click" Header="Kopieren">
                <MenuItem.Icon>
                    <Image Source="pack://application:,,,/Big3.Hitbase.SharedResources;component/Images/Copy.png" />
                </MenuItem.Icon>
            </MenuItem>
            <MenuItem Name="menuItemPaste" Click="menuItemPaste_Click" Header="Einfügen">
                <MenuItem.Icon>
                    <Image Source="pack://application:,,,/Big3.Hitbase.SharedResources;component/Images/Paste.png" />
                </MenuItem.Icon>
            </MenuItem>
        </ContextMenu>

    </UserControl.Resources>
    <Grid MouseRightButtonUp="Grid_MouseRightButtonUp">
        <Image Source="{Binding Path=ImageFilename, ElementName=myUserControl, IsAsync=True}" x:Name="image" />
        <ContentControl x:Name="PictureButton"/>
        <Button Click="buttonChoosePicture_Click">
            <Grid>
                <Image Name="imageBackground" Margin="5" Source="{Binding Path=InitialImageFilename,ElementName=myUserControl,IsAsync=True}"></Image>
                <TextBlock Margin="5" TextAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Center" Text="Klicken Sie hier, um ein Bild hinzuzufügen." Name="textBlock" TextWrapping="Wrap" />
            </Grid>
        </Button>

    </Grid>
</UserControl>
